package com.education.teach.utils;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

public class BasePagerAdapter extends FragmentPagerAdapter {
    List<Fragment> mFragments;
    String[] mTitles;

    public BasePagerAdapter(FragmentManager fm, List<Fragment> list, String[] strArr) {
        super(fm);
        this.mFragments = list;
        this.mTitles = strArr;
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }
}
